package com.my.test.thread.conditition;

public class Consumer extends Thread {

    @Override
    public void run() {
        MyQueue queue = TestMyQueue.myQueue;
        while (true) {
            try {
                String s = (String) queue.get();
                System.out.println("消费："+s);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
